import { defineStore } from "pinia";

export const useNodeStore = defineStore("nodeList", {
  // 这里可以声明 state
  state: () => {
    return { name: "jerry", count: 0 };
  },
  // 这里可以声明 getters
  getters: {
    doubleCount(state) {
      return state.count * 2;
    }
  },
  // 这里可以声明 actions
  actions: {
    addCount(num) {
      this.count += num;
    }
  }
});
